<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="../skin/style.css" rel="stylesheet" type="text/css" />
<link href="{SKIN_PATH}modal.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
	
    <div class="main">
    	
        {template 'menu.html','member'} 
        
        <div class="mod">
    
            <div class="body">
                <form name="myform" action="{url("?module=member&action=edit")}" enctype="multipart/form-data" method="post">
                  <table cellpadding="0" cellspacing="1" class="">
                   <tbody>
                    <tr>
                      <th width="20%" height="30">用户名：</th>
                      <td width="80%" height="30">{$username}</td>
                    </tr>
                    <tr>
                      <th height="30">E-mail：</th>
                      <td height="30"><input name="info[email]" type="text" size="30" require="true" datatype="email|ajax"  msg="邮件格式不正确|"  value="{$email}" url="?module=member&action=checkemail">
                      </td>
                    </tr>
                    <tr>
                      <th height="30">手机号：</th>
                      <td height="30"><input name="info[mobile]" type="text" size="30" require="false" msg="手机号格式不正确|"  value="{$mobile}" url="?module=member&action=checkmobile" datatype="mobile|ajax">
                      </td>
                    </tr>
                    <tr>
                      <th height="30">昵称：</th>
                      <td height="30">
                      <input type="text" msg="昵称不得少于3个字符超过20个字符|" max="20" min="3" url="?module=member&action=checknickname" datatype="limit|ajax" require="true" maxlength="20" size="30" value="{$nickname}" name="info[nickname]">
                      </td>
                    </tr>
                    {if !$SETTING[uc]}
                    <!--<tr>
                      <th height="30">用户头像：</th>
                      <td height="30"><input type="button" value="上传头像" id="avatar" class="button"  />
                      </td>
                    </tr>-->
                    {/if}
                    <tr>
                      <th height="30">所在地区：</th>
                      <td height="30">
                      {if $areaid}
                            <input type="hidden" name="info[areaid]" id="areaid" value="<?=$areaid?>">
                            <span onClick="this.style.display='none';$('#reselect_areaid').show();" style="cursor:pointer;"><?=$AREA[$areaid][name]?> <font color="red">点击重选</font></span>
                            <span id="reselect_areaid" style="display:none;">
                            <span id="load_areaid"></span> 
                            <a href="javascript:areaid_reload();">重选</a>
                            </span>
                      {else}
                            <input type="hidden" name="info[areaid]" id="areaid" value="<?=$areaid?>">
                            <span id="load_areaid"></span>
                            <a href="javascript:areaid_reload();">&nbsp;重选&nbsp;</a>
                      {/if}
                      </td>
                    </tr>
                    <tr>
                        <th height="30">性别：</th>
                        <td height="30"><input type="radio" checked value="0" name="info[gender]"> 男<input type="radio" value="1" name="info[gender]" {if $gender==1} checked="checked"{/if}> 女</td>
                    </tr>
                    <tr>
                      <th height="30">自我介绍：</th>
                      <td height="30">
                       <textarea class="" cols="50" rows="4" id="intro" name="info[intro]">{$intro}</textarea>
                      </td>
                    </tr>
                    </tbody>
                    <tbody style="display:none">
                    {loop $forminfos $forminfo}
                    <tr>
                        <th height="30">{$forminfo[name]}：</th>
                        <td height="30">{$forminfo[form]}</td>
                    </tr>
                    {/loop}
                    <tr>
                      <th height="30"></th>
                      <td height="30"><label>
                        <input type="submit" name="dosubmit" id="button" value="确 定" class="button button-primary" />
                　
                        <input type="reset" name="button2" id="button2" value="重 置" class="button" />
                      </label></td>
                    </tr>
                    </tbody>
                 </table>
              </form>  
            </div>
        </div> 

    </div>
    
    <div class="aside"> 
       {template "left.html", "member"}
    </div>
</div>


<script language="javascript">
$().ready(function() {
	$('form').checkForm(1);
});

function areaid_load(id)
{
	$.get("?module=area&action=load", { field: 'areaid', id: id },
		function(data){
			$('#load_areaid').append(data);
			  });
}

function areaid_reload()
{
	$('#load_areaid').html('');
		areaid_load(0);
}
areaid_reload();
</script>

{template 'footer.html'} 